package cn.com.cabinet.dao;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import com.cabinet.web.entity.Admin;
import com.cabinet.web.entity.User;


public interface AdminDao extends JpaRepository<Admin, Long>,JpaSpecificationExecutor<Admin> {

	@Query("select a from Admin a where a.account = ?1 and a.password = ?2")
	public Admin getAdminByAdminAccountAndAdminPassword(String account,String password);
	
	@Query("select a from Admin a where a.account = ?1")
	public Admin getAdminByAdminAccount(String account);
}
